package org.sikyon.chocolatebiscuit.datamarket;

import org.sikyon.chocolatebiscuit.model.entities.Identifiable;

import java.util.Collection;

/**
 * Represents a data_market store for a particular persistent type.
 *
 * @param <E> The persistent type.
 * @param <K> The persistent type's key type.
 */
public interface Store<E extends Identifiable<K>, K> {

    Collection<? extends E> getAll();

    E get(K id);

    void save(E e);

    void update(E e);

    void delete(E e);
}
